package comday05.itheima03;

public class Demo01 {
    public static void main(String[] args) {
        int a = getSum(10,20);
        int b = getSum(10,20,30);
        double c = getSum(3.12,12.23);

        System.out.println(a);
        System.out.println(b);
        System.out.println(c);



    }


    //定义方法
    //求两个整数的和并返回
    public static int getSum(int a,int b){
        int c = a + b;
        return c;
    }


    //求三个整数的和并返回
    public static int getSum(int a,int b ,int c){
        int d = a + b + c;
        return d;
    }

    //求两个小数的和并返回
    public static double getSum(double a,double b){
        double c = a + b;
        return c;
    }
}
